package com.team.est.controller;

import com.team.est.client.ClassifyService;
import com.team.est.dto.ClassifyDto;
import com.team.est.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 樊浩
 * @version 1.0
 * @description: TODO
 * @date 2021/3/2 15:02
 */
@RestController
@RequestMapping("/api/home/")
public class HomeController {
 @Autowired(required = false)
 private ClassifyService classifyService;

 @RequestMapping("classifyTree")
 public Result<List<ClassifyDto>> classifyTree(){
  List<ClassifyDto> list=this.classifyService.getClassifyTree();
  return new Result<>("0","成功",list);
 }
}
